﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="nonLoginDetails.aspx.vb" Inherits="WebApplication1.nonLoginDetails" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    

<br />

        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="SqlDataSource1" AllowSorting="True" 
            BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" 
            CellPadding="4" style="margin-left:auto; margin-right:auto;">
            <Columns>
                <asp:BoundField DataField="spiritName" HeaderText="Name" 
                    SortExpression="spiritName" >
                <ItemStyle CssClass="spiritName" />
                </asp:BoundField>
                <asp:BoundField DataField="spiritPrice" HeaderText="Price" 
                    SortExpression="spiritPrice" >
                <ItemStyle CssClass="spiritPrice" />
                </asp:BoundField>
                <asp:BoundField DataField="percentageAlochol" HeaderText="Percentage Alochol" 
                    SortExpression="percentageAlochol" >
                <ItemStyle CssClass="percentageAlochol" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Average Rating" >
                <ItemTemplate >
                
                
                <asp:Rating 
                    
        ID="rt_getRating" runat="server" EmptyStarCssClass="empty" 
        FilledStarCssClass="smiley-done" StarCssClass="empty" 
        WaitingStarCssClass="empty"  ReadOnly="True" CurrentRating='<%# Eval("ratingAverage") %>'></asp:Rating>

                
                </ItemTemplate>
                    <ItemStyle Width="150px" />
                </asp:TemplateField>
                <asp:ImageField DataImageUrlField="picture" HeaderText="Picture">
                    <ControlStyle CssClass="detailPicture" />
                <ControlStyle CssClass="detailPicture"></ControlStyle>
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="spiritName" 
                    DataNavigateUrlFormatString="http://en.wikipedia.org/wiki/{0}" 
                    DataTextField="detail" HeaderText="Details" />
            </Columns>
            <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
            <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
            <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
            <RowStyle BackColor="White" ForeColor="#003399" />
            <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
            <SortedAscendingCellStyle BackColor="#EDF6F6" />
            <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
            <SortedDescendingCellStyle BackColor="#D6DFDF" />
            <SortedDescendingHeaderStyle BackColor="#002876" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SpiritConnString %>" 
            ProviderName="<%$ ConnectionStrings:SpiritConnString.ProviderName %>" 
            
            
            
            
            
            SelectCommand="SELECT [ID], [spiritName], [spiritPrice], [percentageAlochol], [manufacturer], [producedIn], [manuWebsite], [picture], [ratingAverage], [diner_fkid], [uploadDate], [detail] FROM [SpiritRatingAverageView] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>

        <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SpiritConnString %>" 
            ProviderName="<%$ ConnectionStrings:SpiritConnString.ProviderName %>" 
            SelectCommand="SELECT [Tag], [ID] FROM [SpiritTagView] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>

        <br />
   <br />


<div style="font-size: medium; font-weight: bold; color: #0000FF">
    <asp:HyperLink ID="hpl_uploadUser" runat="server">
        
    Upload by:&nbsp; <asp:Label ID="lb_uploadName" runat="server" Text="Label"></asp:Label>&nbsp;&nbsp;&nbsp; 
    Upload Time:&nbsp; <asp:Label ID="lb_uploadTime"
        runat="server" Text="Label"></asp:Label>

        </asp:HyperLink>
        <br /><br />
</div>

        Tag: &nbsp;&nbsp;&nbsp;
        <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource4" 
            RepeatDirection="Horizontal">
            <ItemTemplate>
                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("Tag","SpiritListByTag.aspx?Tag={0}") %>' style="text-decoration:none "> 
                   &nbsp;&nbsp; &nbsp;&nbsp;
                   <asp:Label ID="TagLabel" runat="server" Text='<%# Eval("Tag") %>' />
                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </asp:HyperLink></ItemTemplate></asp:DataList><p>


        <asp:SqlDataSource 
            ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SpiritConnString %>" 
            ProviderName="<%$ ConnectionStrings:SpiritConnString.ProviderName %>" 
            
            
            
            SelectCommand="SELECT [ID], [Author], [Title], [Comment], [Spirit_fkid], [commentDate], [diner_fkid], [protrait] FROM [commentInculdeUserPictureView] WHERE ([Spirit_fkid] = ?) ORDER BY [commentDate] DESC"><SelectParameters>
                <asp:QueryStringParameter Name="Spirit_fkid" QueryStringField="ID" 
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    

    
<div >
<p style="font-size: larger; color: #000080; font-family: MingLiU-ExtB">
        <br />Thank you for using the 'Chinese Spirit and Liquret'. If you like this website and 
        want to contribute your own opinion, add new tag, give rating and like this spirit, please <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/Account/Login.aspx">Login
        </asp:HyperLink>at first. Or <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="~/Account/Register.aspx">Registe
        </asp:HyperLink>to become a membership <br /><br />
        </p>
        <p>
        </p></div><br /><br />

<p style="font-size: medium; color: #0000FF;">
    Comments </p><div style="overflow: auto; height:300px;"  >
    <asp:DataList ID="DataList2" 
            runat="server" DataSourceID="SqlDataSource2" Width="900px" CellPadding="4" 
            ForeColor="#333333"><AlternatingItemStyle BackColor="White" /><FooterStyle 
                BackColor="#990000" Font-Bold="True" ForeColor="White" /><HeaderStyle 
                BackColor="#990000" Font-Bold="True" ForeColor="White" /><ItemStyle 
                BackColor="#FFFBD6" ForeColor="#333333" /><ItemTemplate>
                    <div >
                        <div style="text-align:right; font-size:1.1em; font-style:italic;">
                        Time: <%# Eval("commentDate") %>. 
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("diner_fkid","ViewProfile.aspx?dinerID={0}") %>'>
                        <asp:Image src='<%# Eval("protrait") %>' ID="Image2" runat="server"  Height="50px" Width="50px" /> 
                        Author: <%# Eval("Author") %><br /></div><div style="font-size=1.1em; ">
                        </asp:HyperLink>Title: <%# Eval("Title")%><br /></div><br />Comment:<br /> <%# Eval("Comment")%><br /></div></ItemTemplate><SelectedItemStyle 
                BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" /></asp:DataList></div><br />
 <br />
 <br />


 </div>
 <br />
 <br />
 <br />
                    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                    </asp:ToolkitScriptManager>

</asp:Content>
